package Cn.Sarkar.MMS.DataBaseDefinations.Additional

import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.*
import Cn.Sarkar.MMS.DataBaseDefinations.Independent.Accounts
import Cn.Sarkar.Entities.Common.Table

object ThirdPartyAccounts : Table("ThirdPartyAccount") {
    override var Comment: String = "ئۈچىنچى تەرەپ ھىساباتلىرى"
    val AccountID = intColumn("AccountID") reference Accounts.ID
    val WeChatOpenID = stringColumn("WeChatOpenID") size 64 isN false comment "WeChat OPEN ID"
    val AliPayOpenID = stringColumn("AliPayOpenID") size 64 isN false comment "Alipay OPEN ID"
    val QQOpenID = stringColumn("QQOpenID") size 64 isN false comment "QQ OPEN ID"

    init {
        index(WeChatOpenID, AliPayOpenID, QQOpenID) unique true
    }

    override val CATEGORY: Int = 6
}